package model

type Book struct {
	ID       int64   `json:"id" form:"id" gorm:"column:id"`
	Name     string  `json:"name" form:"name" gorm:"column:name;type:varchar(60);NOT NULL;comment:'书名'"`
	AuthorId int64   `json:"author_id" form:"author_id" gorm:"column:author_id;type:bigint(20);NOT NULL;comment:'作者id'"`
	Price    float32 `json:"price" form:"price" gorm:"column:price;NOT NULL;type:decimal(10,2);comment:'书籍单价'"`
	Deleted  int8    `json:"deleted" form:"deleted" gorm:"column:deleted;type:tinyint(4);NOT NULL;default:0;comment:'状态0-正常1-删除'"`
}

func (Book) TableName() string {
	return "book_gorm"
}
